package com.qfedu.dao;

import com.qfedu.pojo.entity.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author:User
 * @time:2022/9/27
 * @explain:
 */
public interface OrderRepository extends JpaRepository<Order,Integer> {

   /**
    * 通过用户id查询
    * @param orderId
    * @return
    */
   @Query(value = "select * from `order` where order_id=?1",nativeQuery = true)
   List<Order> findByOrderId(String orderId);



}
